﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace Hangout.Services.Core.Score
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "UserScoreService" in code, svc and config file together.
    // NOTE: In order to launch WCF Test Client for testing this service, please select UserScoreService.svc or UserScoreService.svc.cs at the Solution Explorer and start debugging.
    public class UserScoreService : IUserScoreService
    {
        Web.Services.Score.Score wrapper = new Web.Services.Score.Score();

        public Web.Model.UserScore IncreaseUserScore(int userId, int scoreInc, string accesstoken)
        {
            return wrapper.IncreaseUserScore(userId, scoreInc, accesstoken);
        }

        public Web.Model.UserScore DecreaseUserScore(int userId, int scoreDec, string accesstoken)
        {
            return wrapper.DecreaseUserScore(userId, scoreDec, accesstoken);

        }

        public int? GetLastScore(int userId)
        {
            return wrapper.GetLastScore(userId);
        }

        public Web.Model.UserScore InsertDefaultScore(int userId, string accesstoken)
        {
            return wrapper.InsertDefaultScore(userId, accesstoken);
        }

        public Web.Model.UserScore InsertScore(int userId, int score, int scoreChange, string accesstoken)
        {
            return wrapper.InsertScore(userId, score, scoreChange, accesstoken);
        }
    }
}
